﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TMIS.BLL
{
    public class Reply
    {
        /// <summary>
        /// 获取答辩记录表信息
        /// </summary>
        /// <param name="guid"></param>
        /// <returns></returns>
        public Model.Reply Get(Guid guid)
        {
            DAL.Reply dal = DALFactory.DALFactory.CreateReply();
            return dal.Search(guid);
        }
        /// <summary>
        /// 根据教师ID号获取教师姓名
        /// </summary>
        /// <param name="nullable"></param>
        /// <returns></returns>
        public string GetTeacher(Guid? guid)
        {
            DAL.Teacher dal = DALFactory.DALFactory.CreateTeacher();
            return dal.GetName(guid);
        }
        public string[] GetTeacher(Guid?[] teacherID)
        {
            string []names = new string[teacherID.Length];
            for (int i = 0; i < names.Length; i++)
            {
                names[i] = this.GetTeacher(teacherID[i]);
            }
            return names;
        }
        /// <summary>
        /// 更新答辩记录表信息
        /// </summary>
        /// <param name="rep"></param>
        public void Update(Model.Reply rep)
        {
            DAL.Reply dal = DALFactory.DALFactory.CreateReply();
            dal.Update(rep);
        }
    }
}
